STEPS IN CREATING AND SIMULATING A LADDER PROGRAM FOR AN OMRON PLC.
HOW TO CONTROL A SERVO MOTOR WITH AN OMRON PLC.
STEPS IN CREATING AND SIMULATING A LADDER PROGRAM FOR AN OMRON PLC.
- Open CX Programmer
- Hover over and select PLC in the top menu bar. On the drop down menu select Change Model.
- On the Change PLC pop-up menu, select the PLC you want to program under Device Type and press OK.
- Next, to your immediate right select Settings and select the CPU Type.
- Next, on the same Change PLC pop-up menu, selec USB under Network Type if you will be using a USB connection to download or upload your program to/from your PLC..
- Next, create an I/O Table by double clicking the IO Table and Unit Setup in the left project tree.
- Select Main Rack by clicking on it once.
- Next, select Options in the menue bar and click on Create.
- Select Yes to confirm that you want to create an IO Table.
- Click Yes to initialize CPU Bus settings. This will clear out any previous module settings that may exsist.
- Next, make sure IO Table, and SIO Unit Parametrs are selected and click on Transfer. This will allow cx programmer to upload the IO Table and any Special IO settings after the IO Table is created.
- Lastly, press OK to finish setting up the IO Table.
- Once the main window opens, perform a "Static Input Check" by openning ...
- Draw the desired ladder using the CPU's addressing scheme.
- Once complete, hover over Program in the top menu bar and select Compile.
- Make sure that the Program you created has 0 errors and 0 warnings once compiled in order to continue.
- Next, hover over Simulation in top menu bar and select Work Online Simulator.
- Once Work Online Simulator is selected, a Download Pop-up box will display showing that the download was successful. Press OK.
- At this point, the XIO (NC) input contacts and certain outputs may or may not be shown active in green.
- At this point, you are able to Force a change of state, of an individual contact, by hovering over the contact and pressing the number 2 mouse button and hovering over the Force submenu and selecting On or Off.
ADDRESSING for OMRON CP1E PLC
S. No |
Element |
Addressing |
1 |
Inputs |
0.0~0.7 |
2 |
Outputs |
100.00~100.07 |
3 |
Input Memory |
W0.0~W512.0 |
4 |
Timers |
T000~T4095 |
5 |
Counters |
C000~C4095 |
6 |
Data Registers |
D0~D32757 |
7 |
Holding Registers |
H0~H1535
H0.0~H1535.15 |
Note: 1)Do not make same addressing for Counters & Timers. In other words, if you use T000, you cannot use C000 in the same program.
2) Holding Registers are those that are latched even when the power is off. In other words, when you power on the PLC these registers will initially be latched or maintain their state.
CONTACT TYPES:
= D0 #1 - Data Register
P_1s - 1.0 second clock pulse bit
P_First_Cycle - First Cycle Flag
P_On - Always ON Flag
CNTR 0000 #9999 - Reversible Counter
TIM 0001 #5 - 100ms Timer (BCD Type)
KEEP CALL_SETUP_SCREEN - CALL SETUP SCREEN
KEEP W4.08
HOW TO CONTROL A SERVO MOTOR WITH AN OMRON PLC.
1. Use the PLS2 instruction to specify the port, output mode and first and second words to specify how the starting and ending characteristics of the signal should be.
A. In the Help menu, select Instruction Reference and look up PLS2. Their, it will state exactly how the formatting should be in order to drive the servo motor. Note that if you don't thoroughly understand the description, you may want to select that you have a different PLC and an alternate instruction definition will display that is very similar and it may help clarify the instruction definition you first looked up.
2. Use the origin ORG instruction to set the origin if absolute cooridinates need to be used.
|